import React, {createRef} from 'react';
import FunChildren from '@/components/09- createRef/FunChildren'

const App = () => {
    const inpRef = createRef();
    const h3Ref = createRef();
    const childrenRef = createRef();
    return (
        <div>
            <h4 ref={h3Ref}>函数组件 ==> 父组件</h4>
            <input ref={inpRef}/>
            <button onClick={() => {
                // h3Ref.current.innerText = '修改Ref'

                // console.log(inpRef.current.value);

                // console.log(childrenRef);
            }}>点击按钮
            </button>
            {/* 函数组件没有实例  所以不能使用ref */}
            {/*<FunChildren ref={childrenRef}></FunChildren>*/}
        </div>
    );
};

export default App;